﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"	
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
    xmlns:auto="clr-namespace:Feedbook.Automation"
    xmlns:model="clr-namespace:Feedbook.Model"
    xmlns:views="clr-namespace:Feedbook.Views" 
    xmlns:custom="clr-namespace:Feedbook.Custom"
    x:Class="Feedbook.Views.Twitter"
    x:ClassModifier="internal"
    mc:Ignorable="d"
	x:Name="Page"
	FlowDirection="LeftToRight" Loaded="Page_Loaded" d:DesignWidth="608.843" d:DesignHeight="427">
    <UserControl.Resources>
        <auto:GetFriendListConverter x:Key="GetFriendListConverter"/>
        <auto:TextToTwitterKeywordConverter x:Key="TextToTwitterKeywordConverter"/>

        <DataTemplate x:Key="FeedTemplate">
            <Grid x:Name="Grid" Margin="4,0" Background="#00000000">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Border Grid.Column="0" Margin="5,5,5,0" Height="44" Width="44" CornerRadius="4" HorizontalAlignment="Center" VerticalAlignment="Top" Background="{Binding Author.ImageUrl, Converter={StaticResource UriToImageBrushConverter}}"/>
                <ContentPresenter Grid.Column="1" Margin="5,5,5,5.5" TextElement.FontSize="12"  Content="{Binding TextDescription, Converter={StaticResource TextToTwitterKeywordConverter}}" TextElement.Foreground="{DynamicResource BackgroundBrush}">
                    <ContentPresenter.Resources>
                        <Style TargetType="{x:Type Hyperlink}">
                            <Setter Property="TextDecorations" Value="None"/>
                            <Setter Property="Foreground" Value="{StaticResource FeedTitleBrush}"/>                            
                        </Style>                     
                    </ContentPresenter.Resources>
                    <ContentPresenter.ContextMenu>
                        <ContextMenu Placement="MousePoint" >
                            <MenuItem Header=" Copy" Click="MenuItem_Click" />
                        </ContextMenu>
                    </ContentPresenter.ContextMenu>
                </ContentPresenter>
                <Grid Grid.ColumnSpan="2" Margin="5,0,0,0" Grid.Row="1">
                    <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="1" Orientation="Horizontal" Margin="0">
                        <TextBlock Margin="0" HorizontalAlignment="Left" Text="{Binding Updated, Converter={StaticResource FriendlyDateTimeConverter}}" VerticalAlignment="Center" Foreground="{DynamicResource FeedTitleBrush}" FontWeight="Normal" FontSize="10.667"/>
                        <TextBlock Margin="0" HorizontalAlignment="Left" Text=" by " VerticalAlignment="Center" Foreground="{DynamicResource FeedTitleBrush}" FontWeight="Normal" FontSize="10.667"/>
                        <TextBlock Margin="0,1,0,0" HorizontalAlignment="Left" Text="{Binding Author.Name}" VerticalAlignment="Center" Foreground="{DynamicResource FeedTitleBrush}" FontWeight="Bold" FontSize="10.667"/>
                    </StackPanel>
                    <Border x:Name="OptionBorder" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,2,8,0" BorderThickness="1" CornerRadius="2" Padding="3,2" Opacity="0" >
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF1B1B1B" Offset="0.508"/>
                                <GradientStop Color="#FF242323" Offset="0.488"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <StackPanel Orientation="Horizontal" Height="Auto" Width="Auto" HorizontalAlignment="Right" VerticalAlignment="Center">
                            <Button x:Name="ReplyButton" Content="@" Template="{DynamicResource TransparentFBButtonTemplate}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,-3,3,0" FontSize="16" Cursor="Hand" Click="ReplyButton_Click">
                                <Button.Effect>
                            		<BlurEffect Radius="1"/>
                            	</Button.Effect>
                            </Button>
                            <Button x:Name="RetweetButton" Content="`" Template="{DynamicResource TransparentFBButtonTemplate}" FontFamily="Webdings" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5,0,3,0" FontSize="16" Cursor="Hand" Click="RetweetButton_Click">
                                <Button.Effect>
                            		<BlurEffect Radius="1" KernelType="Gaussian"/>
                            	</Button.Effect>
                            </Button>
                            <Button x:Name="FollowButton" Content="q" Width="Auto" Template="{DynamicResource TransparentFBButtonTemplate}" FontFamily="Webdings" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,0,3,0" FontSize="16" Cursor="Hand" Click="FollowButton_Click">
                                <Button.Effect>
                            		<BlurEffect Radius="1"/>
                            	</Button.Effect>
                            </Button>
                            <Button x:Name="ProfileButton" Content="J" Width="Auto" Template="{DynamicResource TransparentFBButtonTemplate}" FontFamily="Wingdings" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,0,3,0" FontSize="16" Cursor="Hand" Click="ProfileButton_Click">
                                <Button.Effect>
                            		<BlurEffect Radius="1"/>
                            	</Button.Effect>
                            </Button>
                        </StackPanel>
                    </Border>
                </Grid>
                <Border BorderBrush="Black" BorderThickness="0,1,0,0" Grid.ColumnSpan="2" Grid.RowSpan="1" Grid.Row="2" Margin="8" Background="#FFFFFCFC" Height="2" VerticalAlignment="Center" Opacity="0.395"/>
            </Grid>
            <DataTemplate.Triggers>
                <EventTrigger RoutedEvent="UIElement.MouseEnter" SourceName="Grid">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation To="1" Duration="00:00:0.7" BeginTime="0:0:0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OptionBorder"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
                <EventTrigger RoutedEvent="UIElement.MouseLeave" SourceName="Grid">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation To="0" Duration="00:00:0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OptionBorder"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <DataTemplate DataType="{x:Type model:Channel}">
            <Border BorderThickness="0">
                <Border.Resources>
                    <CollectionViewSource x:Key="FeedSource" Source="{Binding Feeds}">
                        <CollectionViewSource.SortDescriptions>
                            <scm:SortDescription PropertyName="Updated" Direction="Descending"/>
                        </CollectionViewSource.SortDescriptions>
                    </CollectionViewSource>
                </Border.Resources>
                <Grid Height="Auto" Width="305" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Border BorderThickness="0.5,0" Width="Auto" VerticalAlignment="Top" Height="34" d:LayoutOverrides="VerticalAlignment" CornerRadius="1" BorderBrush="#FF121212">
                        <Border.Background>

                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF262A2D" Offset="0"/>
                                <GradientStop Color="#FF5F6367" Offset="0.024"/>
                                <GradientStop Color="#FF676B6F" Offset="0.032"/>
                                <GradientStop Color="#FF585C60" Offset="0.079"/>
                                <GradientStop Color="#FF393D41" Offset="0.952"/>
                                <GradientStop Color="#FF070808" Offset="0.984"/>
                                <GradientStop Color="#FF1E1E1E" Offset="0.992"/>
                                <GradientStop Color="#FF5B5B5B" Offset="1"/>
                            </LinearGradientBrush>

                        </Border.Background>
                        <Grid Width="Auto">
                            <TextBlock TextWrapping="Wrap" Text="{Binding Title.ToPlainText}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="8,0,0,0"/>
                            <Button Content="Ñ" HorizontalAlignment="Right" Width="Auto" d:LayoutOverrides="Height" FontFamily="Wingdings 2" Template="{DynamicResource TransparentFBButtonTemplate}" VerticalAlignment="Center" Margin="0,0,4,0" Foreground="{DynamicResource ContrastBrush}" FontSize="16" Click="DeleteChannel_Click" Cursor="Hand"/>
                        </Grid>
                    </Border>
                    <ListBox Height="Auto" Foreground="{x:Null}" BorderBrush="{x:Null}" Background="{DynamicResource ContrastBrush}" VerticalAlignment="Stretch" Grid.Row="1" ItemsSource="{Binding Source={StaticResource FeedSource}}" ItemTemplate="{StaticResource FeedTemplate}" ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                </Grid>
            </Border>
        </DataTemplate>

        <DataTemplate x:Key="SocialUserTemplate">
            <StackPanel Orientation="Vertical">
                <Grid x:Name="grid" d:LayoutOverrides="Width" VerticalAlignment="Top" Background="Transparent">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>

                    <Border Grid.Row="0" Grid.Column="0" Width="44" Height="44"  CornerRadius="8" Margin="11,0,16,5" Grid.RowSpan="3" Background="{Binding ProfileImageUrl, Converter={StaticResource UriToImageBrushConverter}}"/>
                    <TextBlock Grid.Column="1" Text="{Binding Name}" Foreground="{DynamicResource FeedTitleBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,2,0,0" FontSize="13.333"/>
                    <Button Grid.Column="1" Grid.Row="0" x:Name="UnfollowButton" Visibility="Hidden" Template="{StaticResource TransparentButtonTemplate}" Click="UnfollowButton_Click" VerticalAlignment="Center" HorizontalAlignment="Right" Cursor="Hand" Margin="0,-4,12,0" Content="Ñ" FontFamily="Wingdings 2" FontSize="13.333" Foreground="{DynamicResource BackgroundBrush}"/>
                    <StackPanel Grid.Column="1" Margin="0" Orientation="Horizontal" Grid.Row="1" Grid.RowSpan="1" d:LayoutOverrides="GridBox" HorizontalAlignment="Left">
                        <TextBlock Text="Followers: " VerticalAlignment="Center" Foreground="{DynamicResource BackgroundBrush}"/>
                        <TextBlock Text="{Binding Followers}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource BackgroundBrush}"/>
                        <TextBlock Text="Following: " Margin="10,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource BackgroundBrush}"/>
                        <TextBlock Text="{Binding Followings}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource BackgroundBrush}"/>
                    </StackPanel>
                </Grid>
                <Border BorderBrush="Black" BorderThickness="0,1,0,0" Height="2" Width="Auto" Margin="10" Background="White" Opacity="0.43"/>
            </StackPanel>
            <DataTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True" SourceName="grid">
                    <Setter Property="Visibility" Value="Visible" TargetName="UnfollowButton"/>
                </Trigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <DataTemplate DataType="{x:Type model:Account}">
            <Border BorderThickness="0">
                <Grid Height="Auto" Width="305" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Border BorderThickness="0.5,0" Width="Auto" VerticalAlignment="Top" Height="34" d:LayoutOverrides="VerticalAlignment" CornerRadius="1" BorderBrush="#FF121212">
                        <Border.Background>

                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF262A2D" Offset="0"/>
                                <GradientStop Color="#FF5F6367" Offset="0.024"/>
                                <GradientStop Color="#FF676B6F" Offset="0.032"/>
                                <GradientStop Color="#FF585C60" Offset="0.079"/>
                                <GradientStop Color="#FF393D41" Offset="0.952"/>
                                <GradientStop Color="#FF070808" Offset="0.984"/>
                                <GradientStop Color="#FF1E1E1E" Offset="0.992"/>
                                <GradientStop Color="#FF5B5B5B" Offset="1"/>
                            </LinearGradientBrush>

                        </Border.Background>
                        <Grid Width="Auto">
                            <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Width="Auto" d:LayoutOverrides="Height" VerticalAlignment="Center" Margin="8,0,0,0">
                                <TextBlock TextWrapping="Wrap" Text="{Binding FullName}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0"/>
                                <Border BorderBrush="White" BorderThickness="0,0,1,0" Height="Auto" Width="2" HorizontalAlignment="Center" Background="Black" Opacity="0.625" Margin="8,0,6,0" CornerRadius="1"/>
                                <CheckBox Content="Default" Foreground="{DynamicResource ContrastBrush}" IsChecked="{Binding IsDefault, Mode=TwoWay}" Checked="AccountIsDefault_Checked"/>
                            </StackPanel>
                            <Button x:Name="RemoveAccountButton" Content="Ñ" HorizontalAlignment="Right" Width="Auto" d:LayoutOverrides="Height" FontFamily="Wingdings 2" Template="{DynamicResource TransparentFBButtonTemplate}" VerticalAlignment="Center" Margin="0,0,4,0" Foreground="{DynamicResource ContrastBrush}" FontSize="16" Click="RemoveAccountButton_Click" Cursor="Hand"/>
                        </Grid>
                    </Border>
                    <ListBox Height="Auto" Foreground="{x:Null}" BorderBrush="{x:Null}" Background="{DynamicResource ContrastBrush}" VerticalAlignment="Stretch" Grid.Row="1" ItemsSource="{Binding Converter={StaticResource GetFriendListConverter}}" ItemTemplate="{StaticResource SocialUserTemplate}" ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                </Grid>
            </Border>
        </DataTemplate>
        <Style x:Key="TweetBoxStyle" TargetType="{x:Type TextBox}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TextBox}">
                        <Border x:Name="border" CornerRadius="3" BorderThickness="0,0,1,1" BorderBrush="#A1FFFFFF" d:LayoutOverrides="Width, Height" Background="{DynamicResource PanelBrush2}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Unfocused"/>
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid >
                                <Border Margin="{TemplateBinding Padding}" >
                                    <ContentPresenter x:Name="toolTip" Margin="5,0,0,0" TextElement.Foreground="{StaticResource ContrastBrush}" TextElement.FontStyle="Italic" TextElement.FontSize="12" Content="{TemplateBinding ToolTip}" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0.495" Visibility="Collapsed"/>
                                </Border>
                                <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="Text" Value=""/>
                                    <Condition Property="IsFocused"  Value="false"/>
                                </MultiTrigger.Conditions>
                                <Setter Property="Visibility" Value="Visible" TargetName="toolTip"/>
                            </MultiTrigger>
                            <Trigger Property="IsFocused"  Value="true">
                                <Setter Property="Height" Value="50" TargetName="border"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <views:TweetControl x:Name="TweetControl" d:LayoutOverrides="Height" Margin="0,0,0,8"/>
        <Border Style="{DynamicResource WindowContainerStyle}" Hyperlink.RequestNavigate="ContentPresenter_RequestNavigate" Margin="0" Grid.Row="1" BorderBrush="{x:Null}" Background="{x:Null}">

            <Grid x:Name="LayoutRoot">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid Background="{DynamicResource PanelBrush}">
                    <StackPanel VerticalAlignment="Top" Orientation="Horizontal" Margin="0" Height="34" HorizontalAlignment="Left">
                        <RadioButton x:Name="MessagesRadioButton" Content="Messages" Tag="Messages"  Template="{DynamicResource RadioButtonTemplate}" Foreground="{DynamicResource ContrastBrush}" HorizontalAlignment="Center" Width="82.9" FontWeight="Bold" FontFamily="Segoe WP Semibold" GroupName="TwitterView" Margin="10,0,0,0" Checked="RadioButton_Checked" Focusable="False"/>
                        <RadioButton x:Name="ProfilesRadioButton" Content="Profiles" Tag="Profiles" Template="{DynamicResource RadioButtonTemplate}" Foreground="#FFE0E0E0" HorizontalAlignment="Center" Width="82.9" FontWeight="Bold" FontFamily="Segoe WP Semibold" GroupName="TwitterView" Checked="RadioButton_Checked" Margin="3,0" Focusable="False"/>
                        <Menu VerticalAlignment="Center" Foreground="{DynamicResource ContrastBrush}" FontWeight="Bold" Background="{x:Null}">
                            <MenuItem x:Name="ChannelMenu" TextElement.Foreground="{StaticResource BackgroundBrush}">
                                <MenuItem.Header>
                                    <Button HorizontalAlignment="Center" VerticalAlignment="Center" Click="MenuOpen_Click" Template="{DynamicResource TransparentButtonTemplate}" Content="q" FontFamily="Wingdings 3" Foreground="{DynamicResource ContrastBrush}" Margin="0,2,0,0" FontSize="10.667" Opacity="0.685"/>
                                </MenuItem.Header>
                            </MenuItem>
                        </Menu>
                        <Rectangle Fill="#FF292929" StrokeThickness="0" Width="1" HorizontalAlignment="Center" Margin="4"/>
                        <TextBlock TextWrapping="Wrap" Text="twitter" VerticalAlignment="Center" Foreground="{DynamicResource ContrastBrush}" FontFamily="Segoe WP Semibold" FontSize="16" Margin="7,0,0,1"/>
                    </StackPanel>
                    <TextBox x:Name="TwitterSearchTextBox" HorizontalAlignment="Right" d:LayoutOverrides="Height" VerticalAlignment="Center" Background="{DynamicResource PanelBrush2}" CaretBrush="{DynamicResource ContrastBrush}" Foreground="{DynamicResource ContrastBrush}" Margin="0,0,27,0" Width="140" Padding="2,1,22,1" BorderThickness="0,0,1,1" ToolTip="Search twitter"/>
                    <Button Content="Ë" HorizontalAlignment="Right" d:LayoutOverrides="Height" VerticalAlignment="Center" Template="{DynamicResource TransparentFBButtonTemplate}" Foreground="{DynamicResource ContrastBrush}" FontSize="16" FontWeight="Bold" Margin="0,0,5,0" Cursor="Hand" Click="AddAccount_Click" FontFamily="Wingdings 2" Focusable="False" ToolTip="Add new twitter account"/>
                    <Border BorderBrush="Black" BorderThickness="1,0,0,0" HorizontalAlignment="Right" Width="2" Margin="0,0,43,0" VerticalAlignment="Center" Height="11" Background="White" Opacity="0.565"/>
                    <Button x:Name="TwitterSearchButton" Content="L" HorizontalAlignment="Right" d:LayoutOverrides="Height" FontFamily="Wingdings 3" VerticalAlignment="Center" Template="{DynamicResource TransparentButtonTemplate}" Foreground="{DynamicResource ContrastBrush}" Margin="0,0,31,0" Opacity="0.615" Click="TwitterSearchButton_Click" IsDefault="True"/>
                </Grid>
                <Grid Grid.Row="1" Background="{DynamicResource BackgroundBrush}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="auto"/>
                    </Grid.ColumnDefinitions>
                    <ListBox x:Name="ListBox" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{DynamicResource ContrastBrush}" ScrollViewer.VerticalScrollBarVisibility="Disabled" VerticalContentAlignment="Stretch" ScrollViewer.CanContentScroll="False" BorderThickness="1,1,0,1">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal"/>
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                    </ListBox>
                    <Border x:Name="ProfileGrid" Grid.Column="1" HorizontalAlignment="Right" Margin="0,3,0,0" Width="250" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource ContrastBrush}" Visibility="Collapsed" >
                        <Grid TextElement.Foreground="{StaticResource ContrastBrush}" Margin="0,-1,0,0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Border BorderThickness="0.5,0" Width="Auto" VerticalAlignment="Top" Height="34" CornerRadius="1" BorderBrush="#FF121212">
                                <Border.Background>

                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF262A2D" Offset="0"/>
                                        <GradientStop Color="#FF5F6367" Offset="0.024"/>
                                        <GradientStop Color="#FF676B6F" Offset="0.032"/>
                                        <GradientStop Color="#FF585C60" Offset="0.079"/>
                                        <GradientStop Color="#FF393D41" Offset="0.952"/>
                                        <GradientStop Color="#FF070808" Offset="0.984"/>
                                        <GradientStop Color="#FF1E1E1E" Offset="0.992"/>
                                        <GradientStop Color="#FF5B5B5B" Offset="1"/>
                                    </LinearGradientBrush>

                                </Border.Background>
                                <Grid Width="Auto">
                                    <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Center" Margin="8,0,0,0">
                                        <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" Text="@" FontSize="14.667" Foreground="{DynamicResource ContrastBrush}"/>
                                        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding ScreenName}" FontSize="14.667" VerticalAlignment="Center" Foreground="{DynamicResource ContrastBrush}" Margin="0,-2,0,0"/>
                                    </StackPanel>
                                    <Button Content="Ñ" HorizontalAlignment="Right" Width="Auto" d:LayoutOverrides="Height" FontFamily="Wingdings 2" Template="{DynamicResource TransparentFBButtonTemplate}" VerticalAlignment="Center" Margin="0,0,4,0" Foreground="{DynamicResource ContrastBrush}" FontSize="16" Click="CloseProfile_Click" Cursor="Hand"/>
                                </Grid>
                            </Border>
                            <Grid Grid.Row="1">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="250"/>
                                </Grid.ColumnDefinitions>
                                <Border Grid.Column="0" Margin="5,5,5,0" Height="96" Width="96" CornerRadius="8" HorizontalAlignment="Center" VerticalAlignment="Top" Background="{Binding ProfileImageLocation, Converter={StaticResource UriToImageBrushConverter}}"/>
                                <Button Content="Follow Me" HorizontalAlignment="Right" VerticalAlignment="Bottom" Template="{DynamicResource TransparentFBButtonTemplate}" Margin="0,0,4,3" Click="FollowMe_Click" Cursor="Hand"/>
                                <Grid Grid.Row="2" x:Name="DetailGrid">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="auto"/>
                                        <RowDefinition Height="auto"/>
                                        <RowDefinition Height="auto"/>
                                        <RowDefinition Height="auto"/>
                                    </Grid.RowDefinitions>
                                    <Image VerticalAlignment="Center" Margin="0,10" Source="{Binding ProfileImageLocation}" HorizontalAlignment="Center" MaxWidth="{Binding ActualWidth, ElementName=DetailGrid}" Stretch="None" Visibility="Collapsed"/>
                                    <Grid Grid.Row="2" Background="{DynamicResource PanelBrush2}">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="auto"/>
                                            <RowDefinition Height="auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Text="Followers" VerticalAlignment="Center" d:LayoutOverrides="Width" HorizontalAlignment="Center" Margin="0,3,0,0"/>
                                        <TextBlock Text="{Binding NumberOfFollowers}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0,0,0,4"/>
                                        <Border BorderBrush="Black" BorderThickness="1,0,0,0" Grid.RowSpan="2" HorizontalAlignment="Right" Margin="0,7" Background="White" Width="2" Opacity="0.595" CornerRadius="1"/>
                                        <TextBlock Text="Following"  VerticalAlignment="Center" Grid.Column="1" d:LayoutOverrides="Width" HorizontalAlignment="Center" Margin="0,3,0,0"/>
                                        <TextBlock Text="{Binding NumberOfFriends}"  VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Grid.Column="1" Margin="0,0,0,4"/>
                                        <Border BorderBrush="Black" BorderThickness="1,0,0,0" Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Right" Margin="0,7" Background="White" Width="2" Opacity="0.595" CornerRadius="1"/>
                                        <TextBlock Text="Updates"  VerticalAlignment="Center" Grid.Column="2" d:LayoutOverrides="Width" HorizontalAlignment="Center" Margin="0,3,0,0"/>
                                        <TextBlock Text="{Binding NumberOfStatuses}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Grid.Column="2" Margin="0,0,0,4"/>
                                    </Grid>
                                    <TextBlock TextWrapping="Wrap" Text="{Binding Name}" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="6,9,0,5" Grid.Row="3" FontSize="16" Foreground="{DynamicResource FeedTitleBrush}"/>
                                    <StackPanel Grid.Row="4" VerticalAlignment="Top" Margin="6,3,0,0" Orientation="Horizontal">
                                        <TextBlock Text="Web" Opacity="0.525"/>
                                        <TextBlock TextWrapping="Wrap" Margin="4,0,0,0">
                                            <Hyperlink NavigateUri="{Binding Website}" TextDecorations="None" Foreground="{DynamicResource FeedTitleBrush}">
                                                <Run Text="{Binding Website}"/>
                                            </Hyperlink> 
                                        </TextBlock>
                                    </StackPanel>
                                    <StackPanel Grid.Row="5" VerticalAlignment="Bottom" Margin="6,9,0,0" Orientation="Horizontal">
                                        <TextBlock Text="Location" Opacity="0.525"/>
                                        <TextBlock Text="{Binding Location}" TextWrapping="Wrap" Margin="4,0,0,0"/>
                                    </StackPanel>
                                    <StackPanel HorizontalAlignment="Left" Grid.Row="6" VerticalAlignment="Top" Margin="6,9,0,0">
                                        <TextBlock TextWrapping="Wrap" Text="About" Opacity="0.525"/>
                                        <TextBlock TextWrapping="WrapWithOverflow" Text="{Binding Description}" Margin="0,2,0,0" TextTrimming="WordEllipsis"/>
                                    </StackPanel>
                                    <StackPanel HorizontalAlignment="Left" Margin="6,11,0,0" Orientation="Vertical" Grid.Row="7" VerticalAlignment="Top">
                                        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Update" VerticalAlignment="Center" Opacity="0.53"/>
                                        <ContentPresenter Content="{Binding Status.Text, Converter={StaticResource TextToTwitterKeywordConverter}}" HorizontalAlignment="Left" VerticalAlignment="Top" Opacity="0.795" Margin="0,3,0,0">
                                            <ContentPresenter.Resources>
                                                <Style TargetType="{x:Type Hyperlink}">
                                                    <Setter Property="TextDecorations" Value="None"/>
                                                    <Setter Property="Foreground" Value="{StaticResource FeedTitleBrush}"/>
                                                </Style>
                                            </ContentPresenter.Resources>
                                        </ContentPresenter>
                                    </StackPanel>
                                </Grid>
                            </Grid>
                        </Grid>
                    </Border>
                    <StackPanel x:Name="AddAccountMessage" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="2">
                    	<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" Foreground="{DynamicResource ContrastBrush}" Text="Add multiple twitter accounts "/>
                    	<Button Content="click here" Template="{DynamicResource TransparentButtonTemplate}" Foreground="{DynamicResource FeedTitleBrush}" d:LayoutOverrides="Height" Cursor="Hand" Click="AddAccount_Click"/>
                    </StackPanel>
                </Grid>
            </Grid>
        </Border>
    </Grid>
</UserControl>